import pytest
import requests

@pytest.fixture
def token():
    data = {
        'app_key':"2428ADE4BDE8F46437622FAB51ACDD40",
        'username':'two',
        'password':123456
    }
    r=requests.post(url="http://hn216.api.yesapi.cn/api/App/User/LoginExt",data = data)
    r = r.json()
    # print("-------------",r)
    return r.get('data').get('token')
#
# def test_xx(token): # fixture要传入 测试模块功能
#     xx = token
#     print('ppppppppppppp',xx)
# if __name__ == '__main__':
#     pytest.main(['-s', '-v', __file__])